﻿@{
    Layout = null;
    var weixinMenuList = ViewBag.MenuList;
}
<script type="text/javascript" src="/Content/scripts/weixin.menu.js"></script>
<script>
    $(function () {
        weixin.menu.init();
    }); 
</script>
<div class="pageContent">
    <form method="post" action="/Menu/AddMenu" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
    <div class="pageFormContent" layouth="58">
        <p>
            <label>
                父级菜单：</label>
            <select class="combox" name="weixinmenu_parentid">
                <option value="0">请选择</option>
                @{
                    foreach (var menu in weixinMenuList)
                    {
                        if (menu.level == 1)
                        {
                    <text>
                    <option value="@menu.id">@menu.name</option>
                    </text>
                        }
                    }
                }
            </select>
            <span class="info"></span>
        </p>
        <p>
            <label>
                菜单类型：</label>
            <select class="combox" name="weixinmenu_type" id="weixinmenu_type">
                <option value="click" selected="selected">点击事件</option>
                <option value="view">访问网页</option>
            </select>
            <span class="info"></span>
        </p>
        <p>
            <label>
                名称：</label>
            <input name="weixinmenu_name" class="" type="text" maxlength="20" size="30" value="" />
            <span class="info"></span>
        </p>
        <p id="weixinmenu_key">
            <label>
                关键字：</label>
            <input name="weixinmenu_key" class="" type="text" maxlength="128" size="30" value="" />
            <span class="info"></span>
        </p>
        <p id="weixinmenu_url">
            <label>
                外链URL：</label>
            <input name="weixinmenu_url" class="" type="text" maxlength="256" size="30" value="" />
        </p>
    </div>
    <div class="formBar">
        <ul>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit">
                            保存</button></div>
                </div>
            </li>
            <li>
                <div class="button">
                    <div class="buttonContent">
                        <button type="button" class="close">
                            取消</button></div>
                </div>
            </li>
        </ul>
    </div>
    </form>
</div>
